<%
@SuppressWarnings("unchecked")
java.util.Map<String, Object> nextRequestScopeHanlder = (java.util.Map<String, Object>)request.getAttribute(hope.util.Env.NEXT_REQUEST_SCOPE);
if (nextRequestScopeHanlder == null) {
	nextRequestScopeHanlder  = (java.util.Map<String, Object>)request.getSession().getAttribute(hope.util.Env.NEXT_REQUEST_SCOPE);
	if (nextRequestScopeHanlder != null) {
	  request.getSession().removeAttribute(hope.util.Env.NEXT_REQUEST_SCOPE);
 }
}
StringBuffer msg = new StringBuffer();
if (nextRequestScopeHanlder != null) {
  String message = (String) nextRequestScopeHanlder.get("flash_notice");
  if (message != null) {
    msg.append("<div class=\"cmm_tips\"><span class=\"ico\"></span>");
    msg.append("<span id=\"cmm_flash_tips\">").append(message).append("</span></div>");
  }
  String[] errors = (String[]) nextRequestScopeHanlder.get("flash_errors");
  if (errors != null && errors.length > 0) {
    msg.append("<div class=\"cmm_tips\">").append("<span id=\"cmm_flash_tips\">");
		for (String error : errors) msg.append("<li><span class=\"icoNo\"></span><span>").append(error).append("</span></li>");
		msg.append("</span></div>");
	}
}
StringBuffer css = new StringBuffer();
css.append("<style>");
css.append(".cmm_tips{width:95%;padding:10px; margin:10px 0; line-height:30px; background:#FEFDDF;border:1px solid #FFBC45; color:#343434}");
css.append(".cmm_tips .ico{width:20px; height:30px;  float:left; display:block; background:url(http://home.igame.21cn.com/images/icon.gif) -215px -280px no-repeat;}");
css.append(".cmm_tips .icoNo{width:20px; height:30px;  float:left; display:block;  background:url(http://home.igame.21cn.com/images/icon.gif) -294px -280px no-repeat;}");
css.append(".cmm_tips li{float:left;width:80%}");
css.append("</style>");
out.println(css.toString());
if(msg.length()>0){
out.println("<span id=\"cmm_flash_zone\">"+msg.toString()+"</span>");
%>
<script>
if(typeof(jQuery) != 'undefined'){
			 jQuery("#cmm_flash_zone").fadeIn("fast",function(){
				    setTimeout(function(){jQuery("#cmm_flash_zone").fadeOut("slow")},5000);
			 });
}else{
	   document.getElementById("cmm_flash_zone").style.display=""
	   setTimeout(function(){document.getElementById("cmm_flash_zone").style.display="none"},5000);
}
</script>
<%}else{
out.println("<span id=\"cmm_flash_zone\" id=\"cmm_flash_zone\" style=\"display:none\"><div class=\"cmm_tips\"><span class=\"ico\"></span><span id=\"cmm_flash_tips\"></span></div></span>");
%>
<script>
function showCmmFlashTip(text,notHide){
	 if(typeof(jQuery) != 'undefined'){
					 var f = jQuery("#cmm_flash_zone");
					 if(typeof(text)!='undefined' && text!=''){
						    jQuery("#cmm_flash_tips").html(text);
					 }
					 f.fadeIn("fast",function(){
							    setTimeout(function(){
							    	if(typeof(notHide)=='undefined'){
								    	jQuery("#cmm_flash_zone").fadeOut("slow");
							    	}
								},5000);
					});
	 }else{
		    var f = document.getElementById("cmm_flash_zone");
		    if(typeof(text)!='undefined' && text!=''){
		    	   document.getElementById("cmm_flash_tips").innerHTML=text;
					 }
		    document.getElementById("cmm_flash_zone").style.display=""
		    if(typeof(notHide)=='undefined'){
			    setTimeout(function(){document.getElementById("cmm_flash_zone").style.display="none"},5000);
		    }
	 }
}
</script>
<%}%>